﻿//-----------------------------------------------------------------------
// <copyright file="PhoneCallTask.cs" company="In The Hand Ltd">
//     Copyright © 2014 In The Hand Ltd. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;

namespace InTheHand.Phone.Tasks
{
    /// <summary>
    /// Allows an application to launch the Phone application.
    /// Use this to allow users to make a phone call from your application.
    /// </summary>
    [Obsolete("Use InTheHand.ApplicationModel.Calls", true)]
    public sealed class PhoneCallTask
    {
        /// <summary>
        /// Shows the Phone application.
        /// </summary>
        public void Show()
        {
            Windows.System.Launcher.LaunchUriAsync(new Uri("tel:" + PhoneNumber));
        }

        /// <summary>
        /// Gets or sets the name that is displayed when the Phone application is launched.
        /// </summary>
        public string DisplayName { set; get; }

        /// <summary>
        /// Gets or sets the phone number that is dialed when the Phone application is launched.
        /// </summary>
        public string PhoneNumber { set; get; }
    }
}
